package com.gsnd.gsnd22estore.service;

import com.gsnd.gsnd22estore.dto.CreateOrderDTO;
import com.gsnd.gsnd22estore.dto.OrderPaySuccessDTO;
import com.gsnd.gsnd22estore.dto.QueryOrderDTO;
import com.gsnd.gsnd22estore.dto.extend.QueryOrderDTOExtend;

import java.util.List;

public interface OrderService {

    /**
     *
     * @param userId 用户id
     * @param status 订单状态
     * @param orderId 订单id
     * @return
     */
    List<QueryOrderDTO> getOrderByUser(Integer userId,
                                       Integer status,
                                       String orderId);

    /**
     * 根据orderId查看订单详情
     * @param userId 用户id
     * @param orderId 订单id
     * @return
     */
    QueryOrderDTOExtend getOrderDetailByUser(Integer userId, String orderId);

    QueryOrderDTOExtend addOrder(CreateOrderDTO createOrderDTO,Integer userId);

    void closeOrder(String id);

    void paySuccess(OrderPaySuccessDTO paySuccessDTO);

    void completeOrder(String orderId);
}

